﻿using DevTeam;

using System;
namespace ConfExpert.Forms.Lojistik
{
    public partial class DosyaSec : XPopupForm
    {
        int CustomerId;
        public DosyaSec(int CustomerId)
        {
            InitializeComponent();
            this.CustomerId = CustomerId;
        }

        private void DosyaSec_Load(object sender, EventArgs e)
        {
            gridView1.Init("GetDosyaNo", CustomerId);
            gridView1.AddSummary();
            gridView1.MakeReadOnly();
            gridView1.BestFitColumns();
            gridView1.DoubleClick += gridView1_DoubleClick;
        }

        public string DosyaNo = string.Empty;
        void gridView1_DoubleClick(object sender, EventArgs e)
        {
            DosyaNo = gridView1.GetFocusedDataRow()["DosyaNo"].ToStr();
            if (DosyaNo != string.Empty)
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }
    }
}
